<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue2.6.12.js"></script>
    <style>
		.red{
			background-color: red;
		}
    </style>
</head>
<body>
    <div id="app">
        <div>
            <ul>
                <li v-for="(item,index) in lists" :key="index">{{item}} <button @click="del(index)" > del </button></li>
            </ul>
        </div>
        <div></div>
    </div>
</body>
<script>
   var vm=new Vue({
	   el:'#app',
	   data:{
		   lists:[1,2,3,4,5,6,7,8],
           dataLists:{

           }
	   },
       methods: {
           del(index){
               this.lists.splice(index,1);
           }
       },
       comments:{

       }
   });
</script>
</html>